#include <stdio.h>
#include "vectors.h"
#include "gravity.h"

vector& gravity(vector& r,vector& v,vector& dr)
{
        int GMm=5000;
        return (-GMm/(r-dr).triple())*(r-dr);
}

vector& gravity(vector& r,vector& v,vector& dr, float k)
{
        int GMm=5000;
        return (-GMm/(r-dr).triple())*(r-dr) - (k*v.length())*v;
}

